1. Field of the Invention
The present disclosure relates to storage control, especially to a weighting-type data relocation control device and method.
2. Description of Related Art
A general non-volatile memory (e.g., flash memory) controller (e.g., solid state drive (SSD) controller) detects whether data should be relocated according to several kinds of data relocation decision rules, so as to use storage space efficiently and prevent data from corruption to ensure the correctness of data. The several kinds of data relocation decision rules usually include a garbage collection rule, a data retention rule, a wear leveling rule, etc. The garbage collection rule is for the controller to select a used storage block with less valid data and transfer the valid data of said used storage block to an unused storage block, so that the used storage block is safe to be erased for reuse. The data retention rule is for the controller to transfer valid data of a used storage block to an unused storage block before the valid data of said used storage block become corrupted and unable to be read correctly, so that the time of data retention is extended.
A conventional non-volatile memory controller usually transfers data by a single rule at a time rather than by taking multiple rules into consideration at a time, and thus such controller and the data relocation techniques it takes lead to the performance waste and the reduction in the service life of a non-volatile memory using this kind of controller.